﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$eComDBConnection$" formatter="bizobjlist of ProductQuantityDiscount" >
	<Sql>
		SELECT
			qd.id, qd.companyId, qd.name, qd.quantity, qd.baseDiscount, qd.percentCost, qd.bizRuleCalculator
		FROM
			eComProductQuantityDiscounts INNER JOIN
			eComQuantityDiscounts qd ON eComProductQuantityDiscounts.pricingId = qd.id	
		WHERE
			eComProductQuantityDiscounts.productId = @productId
		ORDER BY qd.quantity DESC;
	</Sql>

	<Param name="productId" type="UniqueIdentifier"/>
</AdoNetDataAccess>